% Classical Greek in my transcription to ISO SGML entities.
% This notation is identical to Yannis Haralambous' notation.

@patterns 0

"<GR>"      1 "<foreign lang=el>"
"<GRA>"     1 ""

@patterns 1

"&"     2 "&"       % jump over SGML entities in source;

"</GR>"     0 "</foreign>"
"</GRA>"    0 ""

"a"         p "&agr;"
"A"         p "&Agr;"
"a|"        p "&aiotgr;"
"A|"        p "&Aiotgr;"
"<a|"       p "&arigr;"
"<A|"       p "&Arigr;"
">a|"       p "&asigr;"
">A|"       p "&Asigr;"
"'a|"       p "&aaigr;"
"'A|"       p "&Aaigr;"
"`a|"       p "&agigr;"
"`A|"       p "&Agigr;"
"=a|"       p "&acigr;"
"=A|"       p "&Acigr;"
"<'a|"      p "&araigr;"
"<'A|"      p "&Araigr;"
">'a|"      p "&asaigr;"
">'A|"      p "&Asaigr;"
"<`a|"      p "&argigr;"
"<`A|"      p "&Argigr;"
">`a|"      p "&asgigr;"
">`A|"      p "&Asgigr;"
"<=a|"      p "&arcigr;"
"<=A|"      p "&Arcigr;"
">=a|"      p "&ascigr;"
">=A|"      p "&Ascigr;"
"<a"        p "&arougr;"
"<A"        p "&Arougr;"
">a"        p "&asmogr;"
">A"        p "&Asmogr;"
"`a"        p "&agragr;"
"`A"        p "&Agragr;"
"'a"        p "&aacugr;"
"'A"        p "&Aacugr;"
"=a"        p "&acirgr;"
"=A"        p "&Acirgr;"
"<'a"       p "&aragr;"
"<'A"       p "&Aragr;"
">'a"       p "&asagr;"
">'A"       p "&Asagr;"
"<`a"       p "&arggr;"
"<`A"       p "&Arggr;"
">`a"       p "&asggr;"
">`A"       p "&Asggr;"
"<=a"       p "&arcgr;"
"<=A"       p "&Arcgr;"
">=a"       p "&ascgr;"
">=A"       p "&Ascgr;"

"b"         p "&bgr;"
"B"         p "&Bgr;"

"g"         p "&ggr;"
"G"         p "&Ggr;"

"d"         p "&dgr;"
"D"         p "&Dgr;"

"e"         p "&egr;"
"E"         p "&Egr;"
"<e"        p "&erougr;"
"<E"        p "&Erougr;"
">e"        p "&esmogr;"
">E"        p "&Esmogr;"
"`e"        p "&egragr;"
"`E"        p "&Egragr;"
"'e"        p "&eacugr;"
"'E"        p "&Eacugr;"
"=e"        p "&ecirgr;"
"=E"        p "&Ecirgr;"
"<'e"       p "&eragr;"
"<'E"       p "&Eragr;"
">'e"       p "&esagr;"
">'E"       p "&Esagr;"
"<`e"       p "&erggr;"
"<`E"       p "&Erggr;"
">`e"       p "&esggr;"
">`E"       p "&Esggr;"
"<=e"       p "&ercgr;"
"<=E"       p "&Ercgr;"
">=e"       p "&escgr;"
">=E"       p "&Escgr;"

"z"         p "&zgr;"
"Z"         p "&Zgr;"

"h"         p "&eegr;"
"H"         p "&EEgr;"
"h|"        p "&eeiotgr;"
"H|"        p "&EEiotgr;"
"<h|"       p "&eerigr;"
"<H|"       p "&EErigr;"
">h|"       p "&eesigr;"
">H|"       p "&EEsigr;"
"'h|"       p "&eeaigr;"
"'H|"       p "&EEaigr;"
"`h|"       p "&eegigr;"
"`H|"       p "&EEgigr;"
"=h|"       p "&eecigr;"
"=H|"       p "&EEcigr;"
"<'h|"      p "&eeraigr;"
"<'H|"      p "&EEraigr;"
">'h|"      p "&eesaigr;"
">'H|"      p "&EEsaigr;"
"<`h|"      p "&eergigr;"
"<`H|"      p "&EErgigr;"
">`h|"      p "&eesgigr;"
">`H|"      p "&EEsgigr;"
"<=h|"      p "&eercigr;"
"<=H|"      p "&EErcigr;"
">=h|"      p "&eescigr;"
">=H|"      p "&EEscigr;"
"<h"        p "&eerougr;"
"<H"        p "&EErougr;"
">h"        p "&eesmogr;"
">H"        p "&EEsmogr;"
"`h"        p "&eegragr;"
"`H"        p "&EEgragr;"
"'h"        p "&eeacugr;"
"'H"        p "&EEacugr;"
"=h"        p "&eecirgr;"
"=H"        p "&EEcirgr;"
"<'h"       p "&eeragr;"
"<'H"       p "&EEragr;"
">'h"       p "&eesagr;"
">'H"       p "&EEsagr;"
"<`h"       p "&eerggr;"
"<`H"       p "&EErggr;"
">`h"       p "&eesggr;"
">`H"       p "&EEsggr;"
"<=h"       p "&eercgr;"
"<=H"       p "&EErcgr;"
">=h"       p "&eescgr;"
">=H"       p "&EEscgr;"

"j"         p "&thgr;"
"J"         p "&THgr;"

"i"         p "&igr;"
"I"         p "&Igr;"
"<i"        p "&irougr;"
"<I"        p "&Irougr;"
">i"        p "&ismogr;"
">I"        p "&Ismogr;"
"`i"        p "&igragr;"
"`I"        p "&Igragr;"
"'i"        p "&iacugr;"
"'I"        p "&Iacugr;"
"=i"        p "&icirgr;"
"=I"        p "&Icirgr;"
"<'i"       p "&iragr;"
"<'I"       p "&Iragr;"
">'i"       p "&isagr;"
">'I"       p "&Isagr;"
"<`i"       p "&irggr;"
"<`I"       p "&Irggr;"
">`i"       p "&isggr;"
">`I"       p "&Isggr;"
"<=i"       p "&ircgr;"
"<=I"       p "&Ircgr;"
">=i"       p "&iscgr;"
">=I"       p "&Iscgr;"

"\"i"       p "&idigr;"
"\"I"       p "&Idigr;"
"`\"i"      p "&igdgr;"
"'\"i"      p "&iadgr;"
"=\"i"      p "&icdgr;"


"k"         p "&kgr;"
"K"         p "&Kgr;"

"l"         p "&lgr;"
"L"         p "&Lgr;"

"m"         p "&mgr;"
"M"         p "&Mgr;"

"n"         p "&ngr;"
"N"         p "&Ngr;"

"x"         p "&xgr;"
"X"         p "&Xgr;"

"o"         p "&ogr;"
"O"         p "&Ogr;"
"<o"        p "&orougr;"
"<O"        p "&Orougr;"
">o"        p "&osmogr;"
">O"        p "&Osmogr;"
"`o"        p "&ogragr;"
"`O"        p "&Ogragr;"
"'o"        p "&oacugr;"
"'O"        p "&Oacugr;"
"=o"        p "&ocirgr;"
"=O"        p "&Ocirgr;"
"<'o"       p "&oragr;"
"<'O"       p "&Oragr;"
">'o"       p "&osagr;"
">'O"       p "&Osagr;"
"<`o"       p "&orggr;"
"<`O"       p "&Orggr;"
">`o"       p "&osggr;"
">`O"       p "&Osggr;"
"<=o"       p "&orcgr;"
"<=O"       p "&Orcgr;"
">=o"       p "&oscgr;"
">=O"       p "&Oscgr;"

"p"         p "&pgr;"
"P"         p "&Pgr;"

"r"         p "&rgr;"
"R"         p "&Rgr;"
"<r"        p "&rrougr;"
"<R"        p "&Rrougr;"

"s"         p "&sgr;"
"S"         p "&Sgr;"
"c"         p "&sfgr;"

"t"         p "&tgr;"
"T"         p "&Tgr;"

"u"         p "&ugr;"
"U"         p "&Ugr;"
"<u"        p "&urougr;"
"<U"        p "&Urougr;"
">u"        p "&usmogr;"
">U"        p "&Usmogr;"
"`u"        p "&ugragr;"
"`U"        p "&Ugragr;"
"'u"        p "&uacugr;"
"'U"        p "&Uacugr;"
"=u"        p "&ucirgr;"
"=U"        p "&Ucirgr;"
"<'u"       p "&uragr;"
"<'U"       p "&Uragr;"
">'u"       p "&usagr;"
">'U"       p "&Usagr;"
"<`u"       p "&urggr;"
"<`U"       p "&Urggr;"
">`u"       p "&usggr;"
">`U"       p "&Usggr;"
"<=u"       p "&urcgr;"
"<=U"       p "&Urcgr;"
">=u"       p "&uscgr;"
">=U"       p "&Uscgr;"

"\"u"       p "&udigr;"
"\"U"       p "&Udigr;"
"`\"u"      p "&ugdgr;"
"'\"u"      p "&uadgr;"
"=\"u"      p "&ucdgr;"

"f"         p "&phgr;"
"F"         p "&PHgr;"

"q"         p "&khgr;"
"Q"         p "&KHgr;"

"y"         p "&psgr;"
"Y"         p "&PSgr;"

"w"         p "&ohgr;"
"W"         p "&OHgr;"
"w|"        p "&ohiotgr;"
"W|"        p "&OHiotgr;"
"<w|"       p "&ohrigr;"
"<W|"       p "&OHrigr;"
">w|"       p "&ohsigr;"
">W|"       p "&OHsigr;"
"'w|"       p "&ohaigr;"
"'W|"       p "&OHaigr;"
"`w|"       p "&ohgigr;"
"`W|"       p "&OHgigr;"
"=w|"       p "&ohcigr;"
"=W|"       p "&OHcigr;"
"<'w|"      p "&ohraigr;"
"<'W|"      p "&OHraigr;"
">'w|"      p "&ohsaigr;"
">'W|"      p "&OHsaigr;"
"<`w|"      p "&ohrgigr;"
"<`W|"      p "&OHrgigr;"
">`w|"      p "&ohsgigr;"
">`W|"      p "&OHsgigr;"
"<=w|"      p "&ohrcigr;"
"<=W|"      p "&OHrcigr;"
">=w|"      p "&ohscigr;"
">=W|"      p "&OHscigr;"
"<w"        p "&ohrougr;"
"<W"        p "&OHrougr;"
">w"        p "&ohsmogr;"
">W"        p "&OHsmogr;"
"`w"        p "&ohgragr;"
"`W"        p "&OHgragr;"
"'w"        p "&ohacugr;"
"'W"        p "&OHacugr;"
"=w"        p "&ohcirgr;"
"=W"        p "&OHcirgr;"
"<'w"       p "&ohragr;"
"<'W"       p "&OHragr;"
">'w"       p "&ohsagr;"
">'W"       p "&OHsagr;"
"<`w"       p "&ohrggr;"
"<`W"       p "&OHrggr;"
">`w"       p "&ohsggr;"
">`W"       p "&OHsggr;"
"<=w"       p "&ohrcgr;"
"<=W"       p "&OHrcgr;"
">=w"       p "&ohscgr;"
">=W"       p "&OHscgr;"

% punctuation marks

"&middot;"  p "&ckgr;"
";"         p "&qmgr;"

"&apos;"    p "&apos;"
"&prime;"   p "&prime;"

% additional entities not in TEI

"\\=a"      p "&amacgr;"
"\\=A"      p "&Amacgr;"
")a"        p "&abregr;"
")A"        p "&Abregr;"

% most likely mistakes for the "circumflex"

"\\=e"      p "&emacgr;"
"\\=E"      p "&Emacgr;"
"\\=i"      p "&imacgr;"
"\\=I"      p "&Imacgr;"
"\\=h"      p "&eemacgr;"
"\\=H"      p "&EEmacgr;"
"\\=o"      p "&omacgr;"
"\\=O"      p "&Omacgr;"
"\\=u"      p "&umacgr;"
"\\=U"      p "&Umacgr;"
"\\=w"      p "&ohmacgr;"
"\\=W"      p "&OHmacgr;"

% warn for illegal characters

"v"         e "gr2sgml.pat: illegal character v"
"V"         e "gr2sgml.pat: illegal character V"
"C"         e "gr2sgml.pat: illegal character C"
"<"         e "gr2sgml.pat: stand alone <"
"'"         e "gr2sgml.pat: stand alone '"
">"         e "gr2sgml.pat: stand alone >"
"\""        e "gr2sgml.pat: stand alone \""
"`"         e "gr2sgml.pat: stand alone `"
"["         e "gr2sgml.pat: illegal character ["
"]"         e "gr2sgml.pat: illegal character ]"


@patterns 2  % jumping SGML entities in source

";"         1 ";"               % end of entity: jump back
"</GR>"     0 ";</foreign>"     % closing Greek early. Forgive.
"</GRA>"    0 ";"               % closing Greek early. Forgive.
" "         1 " "               % something unexpected, also jump back.


@end
